Carbon


SetScriptVariable

Header: Script.h Carbon status: Supported

Sets the specified script variable for the specified script system to the value of the input parameter.

OSErr SetScriptVariable (
    SInt16 script, 
    SInt16 selector, 
    SInt32 param
);
Parameter descriptions
script

A value that specifies the script system whose variable you are setting. Use one of the script-code constants listed in “Script Codes”.

selector

A value that specifies a particular script variable. Use one of the selector constants listed in “Selectors for Script Variables”.

param

The new value for the specified script variable. The actual value to be assigned may be a long integer, standard integer, or signed byte. If the value is not a long integer, you must store it in the low-order word or byte of the param parameter and set the unused bytes to 0.

function result

A result code. The value smBadVerb if the selector is not valid, and smBadScript if the script is invalid. Otherwise, 0 (noErr).

DISCUSSION

Each enabled script system maintains a set of variables that control the current settings of that script system, including the ID numbers of its international resources, its preferred fonts and font sizes, and its primary line direction.

AVAILABILITY

Supported in Carbon. Available in Carbon 1.0.2 and later when running Mac OS 8.1 or later.


© 2000 Apple Computer, Inc. (Last Updated 6/30/2000)